<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>优质对象</title>
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">
    <script src="../js/jquery-3.6.0.min.js"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd" crossorigin="anonymous"></script>

</head>
<body>
<div class="container">
    <div class="row clearfix">
        <div class="col-md-12 column">
            <form class="navbar-form navbar-left" id="fm1" role="search">
                <div class="form-group">
                    <input type="text" class="form-control" placeholder="请输入搜索的美女姓名"/>
                </div> <button type="button" id="btn1" class="btn btn-default">搜索</button>
            </form>
        </div>
    </div>
    <div class="row clearfix">
        <div class="col-md-12 column">
            <table class="table table-bordered">
                <thead>
                <tr>
                    <th>
                        序号
                    </th>
                    <th>
                        类型
                    </th>
                    <th>
                        姓名
                    </th>
                    <th>
                        年纪
                    </th>
                    <th>
                        图片
                    </th>

                    <th>
                        日期
                    </th>
                </tr>
                </thead>
                <tbody id="tbdata">

                </tbody>
            </table>
        </div>
    </div>
    <img src="https://img.lianzhixiu.com/uploads/220311/1-22031113195Q39.jpg">
</div>
<script>
    //定义函数 请求商品列表
    function loadList(){
        $.get("/api/goods/list",function(res){
            $("#tbdata").html("");
            for(var i in res){
                $("#tbdata").append("<tr><td>"+res[i].id+
                "</td><td>"+res[i].typeId+"</td><td>"
                +res[i].girlName+"</td><td>"
                +res[i].age+'</td><td><img src="'
                +res[i].imgPath+'"/></td><td>'
                +res[i].deployDate+"</td></tr>");
            }
        })
    }
    $(function(){
        //加载商品列表
        loadList();

    });
</script>
</body>
</html>